<template>
	<view id="app">
		<!-- 图文内容 -->
		<view class="imgTxt area c666 f30 lh60">
			<!-- 内容 -->
			<rich-text :nodes="content"></rich-text>
		</view>
	</view>
</template>
<script>
	// 定义全局变量that
	var that;
	export default {
		// 页面变量
		data() {
			return {
				// 1承销推广 2关于平台 3隐私政策 4用户协议
				type: 2,
				// 内容文字
				content: '',
			}
		},

		// 页面加载完成后
		onLoad(e) {
			that = this;

			// 判断有无传参
			if (e.type) {
				that.type = e.type;
			}

			var title = '';

			// 判断状态
			if (that.type == 1) {
				title = '承销推广';
				// 赋值内容
				that.content = uni.getStorageSync('config').tui_content;
			} else if (that.type == 2) {
				title = '关于平台';
				// 赋值内容
				that.content = uni.getStorageSync('config').about_content;
			} else if (that.type == 3){
				title = '隐私政策';
				// 赋值内容
				that.content = uni.getStorageSync('config').policy_content;
			} else if (that.type == 4){
				title = '用户协议';
				// 赋值内容
				that.content = uni.getStorageSync('config').agreement_content;
			}

			// 设置标题
			uni.setNavigationBarTitle({
				title: title,
			})
		},

		// 方法集
		methods: {},
	};
</script>
<style>
</style>
